﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCLHTuiKuanInfoQS.ascx.cs" Inherits="Web.Controls.UCLHTuiKuanInfoQS" %>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<script type="text/javascript">
    //$(function () {

    //});
    function GetValue(type) {
        if (type == 'bh') {
            return UCLHUserInfo_hdCollection.Get("bh");
        }
        else if (type == 'bh2') {
            return UCLHUserInfo_hdCollection.Get("bh2");
        }
        else {
            return "";
        }
    }


    function UCLHUserInfo_txtBHKeyPress() {
        if (event.keyCode == 13) {
            setTimeout(function () {

            }, 0);
            event.preventDefault ? event.preventDefault() : (event.returnValue = false);
            if (UCLHUserInfo_txtYongHuH.GetText() == '') {
                alert('请输入用户号。');
                UCLHUserInfo_txtYongHuM.SetText("");
                UCLHUserInfo_txtYSJE.SetText("");
                UCLHUserInfo_txtSSJE.SetText("");
                UCLHUserInfo_txtTuiKuanJE.SetText("");
                UCLHUserInfo_txtYongHuH.Focus();
                return;
            }
            UCLHUserInfo_ASPxCallback1.PerformCallback("bh");
        }
    }        
    
    function UCLHUserInfo_txtBH2KeyPress() {
        if (event.keyCode == 13) {
            event.preventDefault ? event.preventDefault() : (event.returnValue = false);

            if (UCLHUserInfo_cmbFeeType.GetValue() == '-1') {
                alert("请选择费用类型");
                return;
            }
            if (UCLHUserInfo_txtYongHuH.GetText() == '') {
                alert('请输入用户号。');
                return;
            }
            if (UCLHUserInfo_txtYM.GetText() == '') {
                alert('请输入水量年月。');
                return;
            }
            if (!isAllNum(UCLHUserInfo_txtYM.GetText())) {
                alert('请输入正确的水量年月。');
                return;
            }
            
            UCLHUserInfo_ASPxCallback1.PerformCallback("bh2");
            
        }
    }

    function UCLHUserInfo_ASPxCallbackCommonComplete(rs) {
        var arr = rs.split('|');
        var type = arr[0];
        var state = arr[1];
        var specialIdentity = arr[2];
        var msg = arr[3].split('-');
        if (msg[0] == 'True') {
            alert(msg[1]);
        }
        UCLHUserInfo_hdCollection.Set("type", type);
        if (state == 'True') {
            if (type == "bh") {
                //加载信息
                UCLHUserInfo_txtYongHuM.SetText(arr[4]);
                //UCLHUserInfo_txtYSJE.SetText(arr[5]);
                //UCLHUserInfo_txtSSJE.SetText(arr[6]);
                UCLHUserInfo_txtYM.Focus();
            }
            else if (type == "bh2") {
                //加载信息
                UCLHUserInfo_txtYSJE.SetText(arr[4]);
                UCLHUserInfo_txtSSJE.SetText(arr[5]);
                UCLHUserInfo_txtFeiYongBH.SetText(arr[6]);
                UCLHUserInfo_txtTuiKuanJE.Focus();
            }
        }
    }   

</script>
 <div style="display:none;">
                <dx:ASPxButton ID="btnActPerform" ClientInstanceName="UCLHUserInfo_btnActPerform" runat="server" Text="ASPxButton" OnClick="btnActPerform_Click"></dx:ASPxButton>
                    </div>
<dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="UCLHUserInfo_hdCollection" runat="server"></dx:ASPxHiddenField>
<dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="UCLHUserInfo_ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){UCLHUserInfo_ASPxCallbackCommonComplete(e.result);}"></dx:ASPxCallback>
<fieldset style="border: 1px solid  cornflowerblue;width:97%;margin:auto;">
    <legend><b>退款信息</b></legend>
    <table style="width:80%;margin:auto;">
        <tr>
            <td align="right" style="width: 20%">登记文号：
            </td>
            <td style="width: 25%">
                <dx:ASPxTextBox ID="txtLaiHanBH" ReadOnly="true" runat="server" Width="100%" Text=""></dx:ASPxTextBox>
            </td>
            <td style="width: 20%;white-space:nowrap" align="right"><%--许可证编号：--%></td>
            <td style="width: 25%">
                 <dx:ASPxTextBox ID="txtXuKeZH" ReadOnly="true" runat="server" Width="100%" Text="" Visible="false"></dx:ASPxTextBox>
            </td>
            <td >                
            </td>
            <td></td>
        </tr>
        <tr>
            <td align="right" >费用类型：
            </td>
            <td>
                <dx:ASPxComboBox ID="cmbFeeType" ClientInstanceName="UCLHUserInfo_cmbFeeType" runat="server" ValueType="System.String">
                </dx:ASPxComboBox>
            </td>
            <td colspan="4">
                
            </td>
        </tr>
         <tr runat="server" id="trdj1">
            <td align="right">用户号：
            </td>
            <td>
                <dx:ASPxTextBox ID="txtYongHuH" ClientInstanceName="UCLHUserInfo_txtYongHuH" runat="server" Text="" Width="100%" ClientSideEvents-KeyPress="function(s,e){UCLHUserInfo_txtBHKeyPress();}"></dx:ASPxTextBox>
            </td>   
             <td colspan="4"></td>          
        </tr>
         <tr  >
            <td align="right">水量年月：
            </td>
            <td>
                <dx:ASPxTextBox ID="txtYM" ClientInstanceName="UCLHUserInfo_txtYM" runat="server" Text="" Width="100%" ClientSideEvents-KeyPress="function(s,e){UCLHUserInfo_txtBH2KeyPress();}">                 
                </dx:ASPxTextBox>
            </td>   
             <td colspan="4"></td>          
        </tr> 
        <%--<tr runat="server" id="tr1">
            <td align="right">水量年月：
            </td>
            <td>
                <dx:ASPxTextBox ID="txtYM" ClientInstanceName="UCLHUserInfo_txtYM" runat="server" Text="" Width="100%" ClientSideEvents-KeyPress="function(s,e){aa();}">                 
                </dx:ASPxTextBox>
            </td>   
             <td colspan="4"></td>          
        </tr>--%>
        <tr runat="server" id="trdj2">
            <td align="right">用户名：
            </td>
            <td colspan="3">
                <dx:ASPxTextBox ID="txtYongHuM" ClientInstanceName="UCLHUserInfo_txtYongHuM" runat="server" Text="" Width="99.5%"></dx:ASPxTextBox>
            </td>
            <td></td>
            <td></td>
        </tr>
        <tr runat="server" id="trdj4">
            <td align="right" >
                应收金额：
            </td>                
            <td>
               <dx:ASPxTextBox ID="txtYSJE" ClientInstanceName="UCLHUserInfo_txtYSJE" runat="server" Text="" Width="99.5%"></dx:ASPxTextBox>
            </td>
            <td align="right">
                实收金额：
            </td>
            <td>
                <dx:ASPxTextBox ID="txtSSJE" ClientInstanceName="UCLHUserInfo_txtSSJE" runat="server" Text="" Width="99.5%"></dx:ASPxTextBox>
            </td>
            <td align="right">
            </td>
            <td>
                
            </td>
        </tr>
        <tr runat="server" id="trdj6">
            <td align="right" >退款类型：
            </td>                
            <td>
                <dx:ASPxComboBox ID="cmbTuiKuanLX" ClientInstanceName="UCLHUserInfo_cmbTuiKuanLX" runat="server" ValueType="System.String">
                </dx:ASPxComboBox>
            </td>
            <td align="right" colspan="4">
                
            </td>
        </tr>
        <tr runat="server" id="trdj7">
            <td align="right" >退款金额：
            </td>                
            <td>
               <dx:ASPxTextBox ID="txtTuiKuanJE" ClientInstanceName="UCLHUserInfo_txtTuiKuanJE" runat="server" Text="" Width="99.5%">
               </dx:ASPxTextBox>
            </td>
            <td colspan="4">
                <dx:ASPxTextBox ID="txtFeiYongBH" ClientInstanceName="UCLHUserInfo_txtFeiYongBH" runat="server" Text="" Width="99.5%" ClientVisible="false">
               </dx:ASPxTextBox>
            </td>
        </tr>
    </table>
</fieldset>
